function [G,XY] = getgraphDoublestar(nnod);
% creates the graph of "ring" topology with (nnod) nodes:

al = 0:2*pi/(nnod-2):2*pi-1e-10;
XY = [cos(al),-0.5,0.5; sin(al),-0.15,-0.15]';
b=[];
for i=1:nnod-2,b=[b,nnod-1];i=i+1;end
c=b+1;
G = sparse([b,c],[1:nnod-2,1:nnod-2],1,nnod,nnod);
G = spones(G+G');
G = G-spdiags(diag(G),0,nnod,nnod);

